<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./Ajax.js"></script>
</head>
<body>
    <script>
        // function fun(res){
        //     console.log(res);
        // }

        // let ajax = new XMLHttpRequest();
        // ajax.open('get','http://xin.com/1.1.yufan.php');
        // ajax.send();
        // ajax.onload=function(){
        //     console.log(ajax.responseText);
        // }

        Ajax({
            url:'http://xin.com/4.2Ajax.php',
            type:'get',
            data:{
                name:'曼曼',
                age:23,
            },
            // data:"name=曼曼&age=23",
            async: true,
            success:function(res){
                console.log(res);
            },
        })
    </script>
</body>
</html>